<%@ taglib prefix="c"   uri="http://java.sun.com/jsp/jstl/core" %>
<%@page import = "com.db4o.ext.ExtObjectContainer" %>
<%@page import = "com.db4o.servlet.Db4oServlet" %>
<%@page import = "facades.*" %>
<%@page import = "auser.*" %>
<%@page import = "com.db4o.query.*" %>

<% session.removeAttribute("editMezzi"); %>
<% SessionFacade sfacade = new SessionFacade(session); %>
<% String id = request.getParameter("id"); %>   
<c:if test="${!empty param.id}">
	<%  Object bean = sfacade.getById(id); %>
	<%  session.setAttribute("editMezzi",bean); %>
	
</c:if>

<c:if test="${empty param.id}">
	<%  session.setAttribute("editMezzi",new MezziAccompagnato()); %>
	<jsp:setProperty name="editMezzi" property="*" />
	<jsp:setProperty name="editMezzi" property="circolo" value="${userBean.circolo}" />
</c:if>
<jsp:forward page="edit.jsp" />